package base

import "fmt"

// 定义一个通知类的接口

type Message interface {
	sending()
}

type User struct {
	Name  string
	Phone string
}

type Admin struct {
	Name  string
	Phone string
}

func (u *User) sending() {
	fmt.Println("send message to user for phone:", u.Phone)
}

func (a *Admin) sending() {
	fmt.Println("send message to admin for phone:", a.Phone)
}

func SendMessage(m Message) {
	m.sending()
}
